// 环境枚举
enum Environment {
  dev('dev'),
  test('test'),
  prod('prod');

  const Environment(this.value);
  final String value;

  static Environment fromString(String? value) {
    switch (value?.toLowerCase()) {
      case 'dev':
      case 'development':
        return Environment.dev;
      case 'test':
      case 'testing':
        return Environment.test;
      case 'prod':
      case 'production':
        return Environment.prod;
      default:
        return Environment.dev; // 默认为开发环境
    }
  }
}
